Skip to content

Update Inductor windows tutorial with xpu support #3309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Apr 18, 2025
Merged

Conversation

ZhaoqiongZ
Copy link
Contributor

@ZhaoqiongZ ZhaoqiongZ commented Mar 31, 2025

Description

Update Inductor windows tutorial with xpu support

cc @gujinghui @EikanWang @fengyuan14 @guangyey

Copy link

pytorch-bot bot commented Mar 31, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3309

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@ZhaoqiongZ
Copy link
Contributor Author

Hi @svekars , could you help review it?

@svekars svekars added 2.7 module: xpu XPU related issues labels Mar 31, 2025
@svekars svekars requested a review from AlannaBurke March 31, 2025 15:08
Copy link
Contributor

@guangyey guangyey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just need a final approval from the Meta team.

@ZhaoqiongZ
Copy link
Contributor Author

Hi @svekars @AlannaBurke , Could you please review this update at your earliest convenience? We need to add this updated link to pytorch/pytorch#150397 before the release of v2.7. Thank you!

Copy link
Contributor

@AlannaBurke AlannaBurke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a couple of comments on minor things, otherwise this LGTM.


Download and install `MSVC <https://visualstudio.microsoft.com/downloads/>`_.

During Installation, select ``Workloads`` table then ``Desktop & Mobile`` Section, check mark on ``Desktop Development with C++`` and then install.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to have screenshots here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a screenshot here

Windows CPU inductor also support C++ compiler `LLVM Compiler <https://github.com/llvm/llvm-project/releases>`_ and `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html>`_ for better performance.
Please check `Alternative Compiler for better performance on CPU <#alternative-compiler-for-better-performance>`_.

Conda Installation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per pytorch/pytorch#149551, Conda is no longer being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the conda installation and let user create and activate virtual environment on their own

Install a Compiler
^^^^^^^^^^^^^^^^^^

C++ compiler is required for torchinductor optimization, let's take Microsoft Visual C++ (MSVC) as an example.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep formatting consistent, ie, TorchInductor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep formatting for all the TorchInductor

@ZhaoqiongZ
Copy link
Contributor Author

ZhaoqiongZ commented Apr 4, 2025

Hi @svekars @AlannaBurke , all the comments have been addressed, please help review again!

@ZhaoqiongZ
Copy link
Contributor Author

Hi @HamidShojanazeri,
Could you please help review this PR when you have a moment? Your feedback would be greatly appreciated. Thank you!

@jingxu10
Copy link
Contributor

Hi @svekars , any updates?

Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. I've noticed a couple of very minor formatting improvements that should make it a bit more readable.

@ZhaoqiongZ
Copy link
Contributor Author

Hi @svekars, all the suggestions have been committed. Please help approve! Thank you!

@svekars svekars merged commit 41d9958 into pytorch:main Apr 18, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants